i=1
s=0
echo "你想加到几 >>"
read n
while [ $i -le $n ]
do
  s=$((i + s));
  i=$((i+1));
done
echo "累加和：$s"
